package com.th.admin.mapper;

import com.th.admin.bean.City;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

/**
 * @author ThreePure
 * @date 2022/4/22 18:41
 * @description: TODO
 * @since 1.8
 */
@Mapper
public interface CityMapper {

    @Select("SELECT id, name, state, country FROM city WHERE id = #{id}")
    public City findById(long id);

    @Options(useGeneratedKeys = true, keyProperty = "id")
    public void insertCity(City city);
}
